package com.jfirer.validator;

import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.metadata.ConstraintDescriptor;
import com.jfirer.validator.path.api.ConnectionNode;

public interface BeanValidator
{
    <T> void validateBean(//
            Set<ConstraintViolation<T>> result, //
            Set<Class<?>> validateGroups, //
            ConnectionNode beanNode, //
            Object bean);
    
    <T> void validateConstraintedElement(//
            Set<ConstraintViolation<T>> result, //
            Set<Class<?>> validateGroups, //
            Set<ConstraintDescriptor<?>> constraintDescriptors, //
            ConnectionNode node, //
            Object leafbean, //
            Object validateValue);
    
    <T> void validateCascadedElement(//
            Set<ConstraintViolation<T>> result, //
            Set<Class<?>> validateGroups, //
            ConnectionNode node, //
            Object validateValue);
}
